package club.zbiao.modules.system.service;

import club.zbiao.modules.system.domain.Dept;
import club.zbiao.modules.system.service.dto.DeptDTO;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * @author jie
 * @date 2019-03-25
 */
@CacheConfig(cacheNames = "dept")
public interface DeptService extends BaseService<DeptDTO, Dept> {


    /**
     * buildTree
     *
     * @param deptDTOS
     * @return
     */
    @Cacheable(keyGenerator = "keyGenerator")
    Object buildTree(List<DeptDTO> deptDTOS);


}